<admintpl file="header" />
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="javascript:;">下载管理</a></li>
    </ul>
    <form class="well form-search" method="post" action="{:U('AdminDownload/index')}">

            状态：
            <select name="download_status">
                <option value="">全部</option>
                <!--<foreach name="all_type" key="akey" item="vo">-->
                <!--<option value="{$akey}" <if condition="$akey == $download_type">selected</if>>{$vo}</option>-->
                <!--</foreach>-->
                <option value="-1" <if condition="$download_status == -1">selected</if>>未开始</option>
                <option value="1"  <if condition="$download_status == 1">selected</if>>进行中</option>
                <option value="2"  <if condition="$download_status == 2">selected</if>>成功</option>
                <option value="3"  <if condition="$download_status == 3">selected</if>>失败</option>
            </select>

            <input type="submit" class="btn btn-primary" value="搜索" />

    </form>
    <form class="js-ajax-form" action="" method="post">

        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
               <td>类型</td>
				<td>下载地址</td>
				<td>创建时间</td>
				<td>任务开始时间</td>
				<td>任务结束时间</td>
				<td>当前状态</td>
                <td>备注</td>
				<td>操作</td>
            </tr>
            </thead>
            <foreach name="list" item="vo">
                <tr>
					<td>{$vo.type_name}</td>
					<td><if condition="!empty($vo['download_down_url'])"><a href="{$vo.download_down_url}">点击下载</a></if></td>
					<td><php>echo date('Y-m-d H:i:s',$vo['create_time'])</php></td>
					<td>{$vo.begin_time}</td>
					<td>{$vo.finish_time}</td>
                    <td>
                        <if condition="$vo['download_status'] == 0">
                            未开始
                            <elseif condition="$vo['download_status'] == 1"/>
                            进行中
                            <elseif condition="$vo['download_status'] == 2"/>
                            成功
                            <elseif condition="$vo['download_status'] == 3"/>
                            失败
                        </if>
                    </td>
                    <td>{$vo.download_remark}</td>
					<td>
                            <a href="{:U('AdminDownload/delete',array('id'=>$vo['download_id']))}">删除</a>
                    </td>
                </tr>
            </foreach>

        </table>

        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
    function refersh_window() {
        var refersh_time = getCookie('refersh_time');
        if (refersh_time == 1) {
            window.location = "{:U('AdminPost/index',$formget)}";
        }
    }

</script>
</body>
</html>